

public class Test{
    public static void main(String[]args){
        int num = 1;
        int ret = 0;
        while(num <= 5){
            int tmp = 1;
            int sum = 1;
            while(tmp <= num){
                sum *= tmp;
                tmp++;
            }
            ret += sum;
            num++;
        }
        System.out.println("ret = " + ret);
    }
}